package 继承;

public class Student extends Person {
    private String sno;//学好
    private String grade;//年级

    public Student() {//子类构造方法，下一步调用父类构造方法
        //super();在和不在都会调用父类方法
    }

    public Student(int age, String name, String sno, String grade) {
        super(age, name);
        this.sno = sno;
        this.grade = grade;
    }

    public void study(){
        System.out.println("我是学生，我在学习");


    }
    @Override
    public String toString() {
        return super.toString();
    }
}
